package com.lljin.study.springcloudgateway;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * @author lljin
 * @description TODO
 * @date 2020/7/28 23:34
 */
@Configuration
public class RootConfig {
    @Bean
    public RedisRouteDefinitionRepository routeDefinitionRepository(RedisTemplate<String, String> redisTemplate,
                                                                    ObjectMapper objectMapper) {
        return new RedisRouteDefinitionRepository(redisTemplate, objectMapper);
    }
}
